<template>
  <div>
    <div class="info-bar_2">
      <van-nav-bar
        :border="false"
        left-text="支付"
        left-arrow
        @click-left="$router.go(-1)"
      >
        <template #right>
          <van-icon class="emspss" name="ellipsis" />
        </template>
      </van-nav-bar>
    </div>
    <div class="main">
      <van-cell-group>
        <router-link :to="{ name: 'Biosetting' }">
          <van-cell title="人脸支付" :value="status" is-link></van-cell>
        </router-link>
      </van-cell-group>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      status: "",
    };
  },
  mounted() {
    this.getFacepaymentStatus();
  },
  methods: {
    async getFacepaymentStatus() {
      const { data: res } = await this.$http.get("isFacePaymentOpen", {
        params: { id: this.$store.state.emailLogin[0].userID },
      });
      this;
      res.isface.isFace == "false"
        ? (this.status = "未开启")
        : (this.status = "人脸支付");
      console.log(res);
    },
  },
};
</script>

<style lang="less" scoped>
.info-bar_2 {
  position: fixed;
  left: 0;
  width: 100%;
  z-index: 1200;
  .van-nav-bar {
    background-color: #96bbce;
  }
}
.main {
  position: absolute;
  width: 100%;
  top: 48px;
  left: 0;
  background-color: #f2f2f2;
  height: 100%;
}
</style>